package com.yanqu.road.entity.enums;

/**
 * @author duli
 * @version 1.0
 * @date 2020/10/27 15:44
 * @Description 订单支付信息
 */
public enum OrderStatus implements ConvertibleEnum<Integer> {

    PreOrder(0,"预付订单,玩家还未支付"),

    ToBeCharged(1,"已支付,钱还未到账"),

    HasBeenCharged(2,"已支付,钱已到账"),

    DirtyCharge(3,"刷单,玩家修改支付金额");

    private int intValue;
    private String name;
    OrderStatus(int value, String name) {
        intValue = value;
        this.name=name;
    }
    @Override
    public Integer getIntValue() {
        return intValue;
    }

    @Override
    public String getName() {
        return name;
    }

    public static OrderStatus forValue(int value) {
        for (OrderStatus type : OrderStatus.values()) {
            if (type.intValue == value) {
                return type;
            }
        }
        return null;
    }
}
